package functional;

import java.util.function.Supplier;

public class Demo4 {
    public static void main(String[] args) {
//        Supplier<String> stringSupplier = new Supplier<String>() {
//            @Override
//            public String get() {
//                return "蜡笔小新";
//            }
//        };

//        Supplier<String> stringSupplier = ()->{ return "蜡笔小心";};

        Supplier<String> stringSupplier = ()-> "蜡笔大心";

        System.out.println(stringSupplier.get());
    }
}
